package com.fr.ticket;

import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;

/**
 * @author 付荣
 * @version 创建时间：2019年4月16日 上午11:19:39
 */
public class DestStaticData {
	
	private final static String[]  sufix  = {"区","县","市"};
	public static Map<String, String> map = new HashMap<>();
	private final static String[] undefine = {"巍山","镇宁","阿克塞","靖州","阿拉善","互助","巴里坤","喀喇沁左翼","芷江","罗城","巴马","峨眉山","玉屏","城步","宁蒗","西乌旗","镇沅","克拉伦斯镇","鄂伦春旗","博鳌","察布查尔","肃南","围场","天祝","杜尔伯特","玉龙","察右中旗","环江","琼中","大厂","本溪县","新晃","新宾","沿河","屏边","都安","丰宁","金秀","塔城市","潞西","沧源","辉县","富川","元江","荔浦","张家川","同里","喀什市","云林市","和田市","青龙","耿马","通道","陵县","宁洱","东乌旗","北京","麻阳","五峰","威宁","白沙","焉耆","积石山","融水","岫岩","恭城","寻甸","景宁","宽甸","木里","龙胜","达茂旗","贡山","大化","三江","孟连","澜沧","新平","景谷","务川","维西","连南","紫云","昌吉市","清原","长阳","井冈山","南涧","峨山","乳源","甪直","津市","墨江","马祖","东平","关岭","石林","临安","江华","桓仁","门源","塔什库尔干","漾濞","禄劝","克孜勒苏","三都","恒春"};
	
	static{
		FileReader fr = null;
		BufferedReader br = null;
		try {
			fr = new FileReader("E:\\ticket\\dest.txt");
			br = new BufferedReader(fr);
			String line = br.readLine();
			while(line != null){
				String [] s = line.split("\t");
				if(s.length == 2){
					map.put(s[0], s[1]);
					if(s[0].length() >= 2){
						String s0 = s[0];
						for(String ss : sufix){
							s0 = s0.replace(ss, "");
						}
						map.put(s0, s[1]);
					}
					for(String u : undefine){
						if(s[0].contains(u)){
							map.put(u, s[1]);
						}
					}
				}
				line = br.readLine();
			}
			//察右中旗, , 昌吉市, 达茂旗, 荔浦, 西乌旗, 井冈山, 鄂伦春旗, 同里, 克拉伦斯镇, 喀什市, 本溪县, 云林市, 博鳌, 甪直, 和田市, 马祖, 东平, 临安, 塔城市, 潞西, 峨眉山, 东乌旗
			map.put("察右中旗", "内蒙古");
			map.put("昌吉市", "新疆");
			map.put("达茂旗", "新疆");
			map.put("荔浦", "广西");
			map.put("西乌旗", "内蒙古");
			map.put("井冈山", "江西");
			map.put("鄂伦春旗", "内蒙古");
			map.put("同里", "江苏");
			map.put("喀什市", "新疆");
			map.put("本溪县", "辽宁");
			map.put("云林市", "台湾");
			map.put("博鳌", "海南");
			map.put("甪直", "江苏");
			map.put("和田市", "新疆");
			map.put("马祖", "台湾");
			map.put("东平", "山东");
			map.put("临安", "浙江");
			map.put("塔城市", "新疆");
			map.put("潞西", "云南");
			map.put("峨眉山", "四川");
			map.put("东乌旗", "内蒙古");
			map.put("松桃", "贵州");
			map.put("循化", "青海");
			
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}finally{
			try {
				br.close();
				fr.close();
			} catch (IOException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
			
		}
	}

}
